<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        [type]{
            color: red;
        }
        [type="text"]{
            color: darkgreen;
        }
    </style>
</head>
<body>

用户名:<input type="text"><br/>
密码:<input type="password">
</body>
</html>